﻿using PagedList;
using SelfMadeMillionaire.Core.Entities;
using SelfMadeMillionaire.Core.Enums;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using SelfMadeMillionaire.Web.Infrastructure.ViewModels.Home;

namespace SelfMadeMillionaire.Web.Infrastructure.ViewModels.Publications
{
	public class PublicationListViewModel
	{
        public string SortOrder { get; set; }
		public IPagedList<Publication> Publications { get; set; }

		[DisplayName("Start Date:")]
		public DateTime? StartDate { get; set; }

		[DisplayName("End Date:")]
		public DateTime? EndDate { get; set; }

		public SelectList ProductTypes { get; set; }

		[DisplayName("Product:")]
		public ProductType? SelectedProduct { get; set; }

		[DisplayName("Title:")]
		[StringLength(100, ErrorMessage="Length of Title too much")]
		public string Title { get; set; }

        [DisplayName("Min. Access Level:")]
        public byte? MinAccessLevel { get; set; }
        public SelectList AccessLevels { get; set; }

        public bool IsShowOnHomePage { get; set; }
        public bool IsEducation { get; set; }

        public bool IsSendLinkVisible { get; set; }
	}

    public class PublicationAndNewsListViewModel
    {
        public IPagedList<MixedPublicationItemModel> Publications { get; set; }

        [DisplayName("Start Date:")]
        public DateTime? StartDate { get; set; }

        [DisplayName("End Date:")]
        public DateTime? EndDate { get; set; }

        public SelectList ProductTypes { get; set; }

        [DisplayName("Product:")]
        public ProductType? SelectedProduct { get; set; }

        [DisplayName("Title:")]
        [StringLength(100, ErrorMessage = "Length of Title too much")]
        public string Title { get; set; }

        public bool IsShowOnHomePage { get; set; }
        public bool IsEducation { get; set; }
        public string SortOrder { get; set; }        
    }
}
